import 'package:flutter/foundation.dart';

enum FlutterPageState {
  loading,
  loaded,
}

class FlutterPageController extends ValueNotifier<FlutterPageState> {
  FlutterPageController(super.value);

  factory FlutterPageController.init() =>
      FlutterPageController(FlutterPageState.loading);

  factory FlutterPageController.loading() =>
      FlutterPageController(FlutterPageState.loading);

  factory FlutterPageController.loaded() =>
      FlutterPageController(FlutterPageState.loaded);

  void update(FlutterPageState state) {
    value = state;
  }
}
